@extends('layouts.master')

@section('title')
@parent
:: Collapse
@stop

@section('styles')
@parent
{{ HTML::script('http://cdn.alloyui.com/3.0.0/aui/aui-min.js') }}
{{ HTML::style('http://cdn.alloyui.com/3.0.0/aui-css/css/bootstrap.min.css') }}
@stop

@section('content')
<script>

YUI().use(
  'aui-tree-view',
  function(Y) {
    var children = [
      {
        children: [
          {
			  children: [
			  {
				label: 'File A'
			  },
			  {
				label: 'File B'
			  },
			  {
				label: 'File C'
			  }
			],
			expanded: true,
            label: 'Folder X'
          },
          {
            label: 'File Y'
          },
          {
            label: 'File Z'
          }
        ],
        expanded: true,
        label: 'Root'
      }
    ];

    new Y.TreeView(
      {
        boundingBox: '#myTreeView',
        children: children
      }
    ).render();
  }
);

</script>

<div id="myTreeView"></div>

@stop
